<?php

	if(!empty($_POST['email'])):
		include_once "common/inc/constants.inc.php";
		include_once "common/inc/class.mailbase.php";
		$e = trim($_POST['email']);
		
		$mail = new MailBase(); 
		$mail2 = new MailBase(); 
		

        $to = trim($e);

       

        $headers = <<<MESSAGE
		Register For Comicblocks BETA!
		
MESSAGE;

        $msg = <<<EMAIL
<html>
	<body>
		<div style="-moz-border-radius: 3px; 
		-webkit-border-radius:3px; border-radius:
		3px; width:80%; margin:0 auto; border:solid 1px #646464; color: #646464">
		<div style="width:100%; height: 40px; background-color: #359fcc"></div>
			<div style="padding: 20px">
			<p>Hello,</p>
			<p>Are you an aspiring comic book artist or perhaps a writer? If your answer is yes then this is the site for you! Comicblocks is a free platform for comic authors to publish and market their work. </p>
			<p>As Comicblocks is new we can use all the help we can get.You can help us by registering for BETA at  <a href="http://comicblocks.com">comicblocks.com</a>  or by donating via Indiegogo.com.</p>
			<p>Register now and get an early access to the BETA version!</p>
			<p>Thank you, <br /> The Comicblocks Team</p>
			 </div>
		</div>
	</body>


</html>

EMAIL;
		$mail->sendMail($to,"admin@comicblocks.com", "New User", $headers, $msg);
		$msg2 = "User ". $to . " has been referalled to comicblocks!";
		$mail2->sendMail("admin@comicblocks.com","admin@comicblocks.com", "New User", "NEW Referal", $msg2);
		
		
		
		
	else:
		echo "Failed";
		endif;
	
?>